﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Data;
using Data.Entities;
namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            DataContext.CreateDataBase();

            var ctx = DataContext.BuildContext();
            Person p = ctx.People.FirstOrDefault();
            ctx.LoadProperty(p, x => x.BankAccount);
            Console.WriteLine(p.BankAccount.AccountNumber);

        }
    }
}
